///
/// Central game manager class. Initializes the game, contains the main loop
/// and cleans up
///

#pragma once

// Dependencies
#include "GameState.h"

namespace Core
{

    class Game
    {
    public:
        void Run();
        
    // Main loop management functions
    public:
        static friend bool GameLoop();
        void PushState(Core::GameState *state);
        void PopState();
        
        static bool GainFocus();
        static bool LoseFocus();
        unsigned int GetGameTickCount();
        
    // Members
    private:
        int screenWidth, screenHeight;
        bool fullscreen;
        bool running;
        std::vector<Core::GameState*> stateStack;
        unsigned int lostTicks, lostTicksStart;
        
    // Public members
    public:
        HGE *hge; 
        hgeResourceManager* resourceManager;  //resources
    };
    
    // Globals aren't very nice, but required because of HGE's design
    extern Game game;

}